package com.pomr.service.sys;

import com.pomr.entity.UserEffect;
import com.pomr.model.sys.Effect;
import com.pomr.model.sys.User;

import java.util.List;

public interface LoginService {
	/**
	 * 登录 通过用户名、密码查询用户
	 * @param user 
	 * @return
	 */
	public User getUserOfLogin(User user) throws Exception;
	
	/**
	 * 注册用户
	 * @param user
	 * @return 是否成功
	 * @throws Exception
	 */
	public boolean registerUser(User user) throws Exception;
	
	/**
	 * 验证用户名是否已存在
	 * @param uname
	 * @return 已存在返回true
	 * @throws Exception
	 */
	public boolean testUname(String uname) throws Exception;
	
	/**
	 * 验证用户通过邮箱
	 * @param uname
	 * @return
	 * @throws Exception
	 */
	public boolean testUnameByEmail(String uname, String email) throws Exception; 
	
	/**
	 * 更新密码
	 * @param uname
	 * @param pwd
	 * @return
	 * @throws Exception
	 */
	public boolean changePwd(String uname, String pwd) throws Exception;

	public UserEffect searchEffectsByUserId(Integer userid) throws Exception;

}
